package com.hp.ssmp.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hp.ssmp.dao.DetailsMapper;
import com.hp.ssmp.entity.TOrderDetails;

import com.hp.ssmp.service.DetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service("detailsService")
@Transactional
public class DetailsServiceImpl extends ServiceImpl<DetailsMapper, TOrderDetails> implements DetailsService {
    @Autowired
    private DetailsMapper detailsMapper;


    @Override
    public List<TOrderDetails> getDetailsList(Long orderid) {
        QueryWrapper<TOrderDetails> wrapper = new QueryWrapper<TOrderDetails>();
        if (orderid != null && !"".equals(orderid)) {
            wrapper.eq("orderid", orderid);
        }
        return detailsMapper.selectList(wrapper);
    }
}
